const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('base_draw_master_info', {
    id: {
      autoIncrement: true,
      type: DataTypes.BIGINT,
      allowNull: false,
      primaryKey: true,
      comment: "唯一标识"
    },
    drawcertinfoId: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "图审原信息ID",
      field: 'drawcertinfo_id'
    },
    drawbooknum: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "图审合格书编号"
    },
    issutime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "发证时间"
    },
    itemnumber: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "立项文号"
    },
    approvaldepartment: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "立项审批部门"
    },
    projectname: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "项目名称"
    },
    projectnum: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "项目编号"
    },
    projectcode: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "项目代码"
    },
    projectguid: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "项目唯一标识"
    },
    province: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "项目所在省（自治区、直辖市）"
    },
    city: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "项目所在市（州、盟）"
    },
    county: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "项目所在县（区、市、旗）"
    },
    invest: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "投资预算（万元）"
    },
    address: {
      type: DataTypes.STRING(500),
      allowNull: true,
      comment: "工程地址"
    },
    type: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "工程类型"
    },
    projecttype: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "工程类别"
    },
    plannum: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "计划批文号"
    },
    projectgrade: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "工程等级"
    },
    quality: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "建设性质"
    },
    scale: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "建设规模"
    },
    jsydnum: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "建设用地规划许可证编号"
    },
    jsgcnum: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "建设工程规划许可证编号"
    },
    struction: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "结构体系"
    },
    baseform: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "基础形式"
    },
    packbuild: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "装配式建筑"
    },
    surveygrade: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "勘察等级"
    },
    surveycontent: {
      type: DataTypes.STRING(500),
      allowNull: true,
      comment: "勘察大纲"
    },
    surveyphoto: {
      type: DataTypes.BLOB,
      allowNull: true,
      comment: "勘察照片、影像"
    },
    defencetype: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "防护类别"
    },
    firegrade: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "耐火等级"
    },
    fireconclusion: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "消防设计审查结论"
    },
    civilconclusion: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "人防设计审查结论"
    },
    civilarea: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "人防工程建筑面积（m2）"
    },
    civilfloor: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "人防工程所在层数（层）"
    },
    seismicintensity: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "抗震设防烈度"
    },
    seismiccategory: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "抗震设防类别"
    },
    seismicgrade: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "抗震等级"
    },
    overrunconclusion: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "超限审查结论"
    },
    speciaconclusion: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "专项审查结论"
    },
    greenstandard: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "绿色建筑设计标准"
    },
    drawnum: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "图纸工号"
    },
    drawrecordnum: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "图审备案号"
    },
    zptattachguid: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "总平图附件唯一标识"
    },
    undercararea: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "地下车库建筑面积"
    },
    danweiguid: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "录入单位"
    },
    createdate: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "创建时间"
    },
    issubmit: {
      type: DataTypes.STRING(10),
      allowNull: true,
      comment: "是否提交"
    },
    issuauthority: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "发证机关"
    },
    hgsattachguid: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "合格书附件唯一标识"
    },
    jzmjattachguid: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "建筑面积审核表附件唯一标识"
    },
    loginid: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "登录账号"
    },
    district: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "所属辖区"
    },
    buildcorpguid: {
      type: DataTypes.BIGINT,
      allowNull: true,
      comment: "建设单位唯一标识"
    },
    surveycorpguid: {
      type: DataTypes.BIGINT,
      allowNull: true,
      comment: "勘察单位唯一标识"
    },
    designcorpguid: {
      type: DataTypes.BIGINT,
      allowNull: true,
      comment: "设计单位唯一标识"
    },
    censorshipcorpguid: {
      type: DataTypes.BIGINT,
      allowNull: true,
      comment: "图审机构唯一标识"
    },
    isDeleted: {
      type: DataTypes.TINYINT,
      allowNull: true,
      comment: "1=已删除 0=未删除",
      field: 'is_deleted'
    },
    createdUser: {
      type: DataTypes.BIGINT,
      allowNull: true,
      comment: "创建人",
      field: 'created_user'
    },
    createdTime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "本系统创建时间",
      field: 'created_time'
    },
    updatedUser: {
      type: DataTypes.BIGINT,
      allowNull: true,
      comment: "修改人",
      field: 'updated_user'
    },
    updatedTime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "修改时间",
      field: 'updated_time'
    }
  }, {
    sequelize,
    tableName: 'base_draw_master_info',
    timestamps: false,
    indexes: [
      {
        name: "PRIMARY",
        unique: true,
        using: "BTREE",
        fields: [
          { name: "id" },
        ]
      },
    ]
  });
};
